package com.iseastar.guojiang.consts;

import com.iseastar.guojiang.BeeApplication;

import droid.frame.utils.android.Log;
import droid.frame.utils.http.HttpClient;

public class AppConfig extends droid.frame.Config {

    /**
     * 百度定位的频率
     */
    private static final int badiuLocBeat = 1000 * 60 * 5;

    // 初始密码123123
    public static final String initPassword = "";

    /**
     * {@link BeeApplication#onCreate() 的先初始化全局变量}
     */
    public static void init() {
        //设置网络请求不加密
        HttpClient.isRAS = false;
        isTest = true;
        if (isTest) {
            Log.setOpen(true);
        } else {
            Log.setOpen(true);
        }
    }

    //上传图片或文件
    public final static String file_url = "http://files.shouhuobao.com:8080/fileUpload/fileUpload/product";
    public final static String file_url_test = "http://files.shouhuobao.com:8080/fileUpload/fileUpload/test";

    // 火箭联盟正式服务器
    //    private final static String take_url = "http://182.92.190.64:8082/take/";
    private final static String take_url = "https://ds.shouhuobao.com/take/";
    //    private final static String take_url = "https://ds2018.shouhuobao.com/take/";
    //火箭联盟测试服务器
//    private final static String take_url_test = "http://123.56.87.34:8082/take/";
    private final static String take_url_test = "https://ds-t.shouhuobao.com/take/";
    //亚克本地电脑
//        private final static String take_url_test = "http://10.100.0.219:8080/take/";
    //        private final static String take_url_test = "http://10.100.0.187:8082/take/";
    //哈兹密的测试
    //    	private static final String take_url_test = "http://10.100.0.3:8082/take/";
    //蚩尤的本地
//    private static final String take_url_test = "http://10.100.0.100:8082/take/";
    //白起的本地
//    private static final String take_url_test = "http://10.100.0.29:8090/take/";

    //裹儿
    //裹儿测试环境
    //    private static final String SERVER_URL_guoer_test = "http://123.56.87.34:8080/guoer-appserv/";
    private static final String SERVER_URL_guoer_test = "http://jk.shouhuobao.com/guoer-appserv/";
    //裹儿正式服务器
    private static final String SERVER_guoer_URL = "http://guor.shouhuobao.com/guoer-appserv/";

    /**
     * 裹儿
     *
     * @return
     */

    public static final String getGuoErServerUrl() {
        if (isTest) {
            return SERVER_URL_guoer_test;
        }
        return SERVER_guoer_URL;
    }

    /**
     * 代收
     *
     * @return
     */
    public static final String getTakeUrl() {
        if (isTest) {
            return take_url_test;
        }
        return take_url;
    }

    /**
     * 文件上传
     *
     * @return
     */
    public static final String getFileUrl() {
        if (isTest) {
            return file_url_test;
        }
        return file_url;
    }

    public static int getBadiuLocBeat() {
        return badiuLocBeat;
    }

    /**
     * 目前代码的状态
     *
     * @return
     */
    public static boolean isTestStatus() {
        return isTest;
    }
}
